<template>
  <!-- 企业审核 -->
  <el-dialog
    v-dialogDrag
    title="审核记录"
    :visible.sync="dialogVisible"
    class="dialogStyleMiddle"
    :before-close="handleClose"
    append-to-body
  >
    <el-table
      ref="multipleTable"
      :data="tableData"
      style="width: 100%;"
      stripe
      class="table-list"
    >
      <!--      <el-table-column type="selection" width="55" />-->
      <el-table-column prop="createTime" :show-overflow-tooltip="true" label="审核时间" min-width="120" align="center" />
      <el-table-column prop="reason" :show-overflow-tooltip="true" label="审核原因" min-width="150" align="center" />
      <el-table-column label="审核状态" min-width="150" align="center">
        <template slot-scope="{row}">
          <span v-if="row.checkStatus === '0'">审核成功</span>
          <span v-if="row.checkStatus === '1'">审核失败</span>
        </template>
      </el-table-column>
    </el-table>
  </el-dialog>
</template>

<script>
import { auditList } from '@/api/PersonalOffice/approvalManage/personApproval'
export default {
  name: 'EnterRecord',
  components: {
  },
  data() {
    return {
      dialogVisible: false, // 弹框显隐
      /* 表单 start */
      tableData: []
    }
    /* 表单 end */
  },
  methods: {
    /* 新增/编辑弹层 start */
    // 初始化信息
    handleAdd(userId) {
      this.dialogVisible = true
      this.getList(userId)
    },
    async getList(userId) {
      const { data } = await auditList({ userId })
      this.tableData = data
    },
    // 关闭
    handleClose() {
      this.dialogVisible = false
    }
    /* 新增/编辑弹层 end */
  }
}
</script>

